/*
** init_args_width.c for dayday in /home/dd/projs/dayday/srcs/client
** 
** Made by dd
** Login   <alletr_p@epitech.net>
** 
** Started on  Tue Jul 21 19:51:42 2009 dd
** Last update Tue Jul 21 21:01:42 2009 dd
*/

#include <assert.h>
#include <stdlib.h>

#include "client.h"

int	init_args_width(t_all *all, char *optarg)
{
  int	w;

  assert(all && optarg);
  w = atoi(optarg);
  if (w < 300)
    {
      print(STRERR_ARGS_WIDTH);
      return (FAILURE);
    }
  all->game.screen.width = w;
  return (SUCCESS);
}
